package com.lcxw.hxzb.friendcircle.project.system.service.impl;

import java.util.List;

import cn.hutool.core.date.DateTime;
import com.lcxw.hxzb.friendcircle.common.utils.DateUtils;
import com.lcxw.hxzb.friendcircle.project.system.domain.YwpdLovesMoneyDetail;
import com.lcxw.hxzb.friendcircle.project.system.mapper.YwpdLovesMoneyDetailMapper;
import com.lcxw.hxzb.friendcircle.project.system.service.IYwpdLovesMoneyDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 资产值明细Service业务层处理
 *
 * @author ruoyi
 * @date 2020-09-27
 */
@Service
public class YwpdLovesMoneyDetailServiceImpl implements IYwpdLovesMoneyDetailService {
    @Autowired
    private YwpdLovesMoneyDetailMapper ywpdLovesMoneyDetailMapper;

    /**
     * 查询资产值明细
     *
     * @param detailId 资产值明细ID
     * @return 资产值明细
     */
    @Override
    public YwpdLovesMoneyDetail selectYwpdLovesMoneyDetailById(Long detailId) {
        return ywpdLovesMoneyDetailMapper.selectYwpdLovesMoneyDetailById(detailId);
    }

    /**
     * 查询资产值明细列表
     *
     * @param ywpdLovesMoneyDetail 资产值明细
     * @return 资产值明细
     */
    @Override
    public List<YwpdLovesMoneyDetail> selectYwpdLovesMoneyDetailList(YwpdLovesMoneyDetail ywpdLovesMoneyDetail) {
        return ywpdLovesMoneyDetailMapper.selectYwpdLovesMoneyDetailList(ywpdLovesMoneyDetail);
    }

    /**
     * 新增资产值明细
     *
     * @param ywpdLovesMoneyDetail 资产值明细
     * @return 结果
     */
    @Override
    public int insertYwpdLovesMoneyDetail(YwpdLovesMoneyDetail ywpdLovesMoneyDetail) {
        ywpdLovesMoneyDetail.setCreateTime(DateUtils.getNowDate());
        return ywpdLovesMoneyDetailMapper.insertYwpdLovesMoneyDetail(ywpdLovesMoneyDetail);
    }

    /**
     * 修改资产值明细
     *
     * @param ywpdLovesMoneyDetail 资产值明细
     * @return 结果
     */
    @Override
    public int updateYwpdLovesMoneyDetail(YwpdLovesMoneyDetail ywpdLovesMoneyDetail) {
        return ywpdLovesMoneyDetailMapper.updateYwpdLovesMoneyDetail(ywpdLovesMoneyDetail);
    }

    /**
     * 批量删除资产值明细
     *
     * @param detailIds 需要删除的资产值明细ID
     * @return 结果
     */
    @Override
    public int deleteYwpdLovesMoneyDetailByIds(Long[] detailIds) {
        return ywpdLovesMoneyDetailMapper.deleteYwpdLovesMoneyDetailByIds(detailIds);
    }

    /**
     * 删除资产值明细信息
     *
     * @param detailId 资产值明细ID
     * @return 结果
     */
    @Override
    public int deleteYwpdLovesMoneyDetailById(Long detailId) {
        return ywpdLovesMoneyDetailMapper.deleteYwpdLovesMoneyDetailById(detailId);
    }

    @Override
    public List<YwpdLovesMoneyDetail> selectMoneyDetailList(YwpdLovesMoneyDetail ywpdLovesMoneyDetail) {
        return ywpdLovesMoneyDetailMapper.selectMoneyDetailList(ywpdLovesMoneyDetail);
    }
}
